<?php
/**
 * Created by cnhuoniu.com.
 * User: wchp
 * Date: 2018/9/9
 * Time: 11:06
 */

namespace app\index\controller;

use think\Controller;

class Login extends Controller
{
    public function index()
    {

    }

    public function check(){
        $data = input('post.');
        $param = [
            'username' => $data['username'],
            'password' => $data['password'],
        ];
        $result = model('User')->where($param)->select();
        if($result){
            $this->redirect('member/index/index');
        }else{
            echo '登陆失败';
        }
    }
}